<?php

/**
 * medee actions.
 *
 * @package    NewsPortal
 * @subpackage medee
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class newsComponents extends sfComponents
{
  public function executeMostnews()
  {
    $this->mostnews = Doctrine_Core::getTable('News')
      ->createQuery('a')
      ->orderBy('view DESC')
      ->limit(1)
      ->execute();
  }
  public function executeDeednews()
  {
    $this->deednews = Doctrine_Core::getTable('News')
      ->createQuery('a')
      ->where('homepage=1')
      ->orderBy('id DESC')
      ->limit(3)
      ->execute();
  }
  public function executeDoodnews()
  {
    $this->doodnews = Doctrine_Core::getTable('News')
      ->createQuery('a')
      ->where('homepage=1')
      ->orderBy('id DESC')
      ->limit(3)
      ->execute();          
  }  
}
